package com.wangx.sell.managerservice;

import com.wangx.sell.managermapper.TbItemMapper;
import com.wangx.sell.managerpojo.TbItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName ItemServiceImpl
 * @Author wangx
 * @Date 2019/3/20 15:56
 * @Vsersion 1.0
 * @Description TODO
 **/
@Service
public class ItemServiceImpl implements ItemService {

    @Autowired
    private TbItemMapper tbItemMapper;

    @Override
    public TbItem getItemById(long itemId) {
        TbItem tbItem = tbItemMapper.selectByPrimaryKey(itemId);
        if (tbItem != null) {
            return tbItem;
        }
        return null;
    }
}
